﻿using System;

class NfactAndKfact2
{
    static void Main()
    {
        decimal factorial = 1m;
        decimal result = 1m;
        Console.WriteLine("Enter N:");
        decimal N = decimal.Parse(Console.ReadLine());
        Console.WriteLine("Enter K > N:");
        decimal K = decimal.Parse(Console.ReadLine());
        if (N > K)
        {
            Console.WriteLine("Invalid input!");
        }
        else
        {
            for (int i = 1; i <= N; i++)
            {
                factorial *= i;
            }
            for (decimal j = N + 1; j <= K; j++)
            {
                result *= j;
            }
            Console.WriteLine("N!*K! / (K-N)! = {0}", factorial*result);
        }
    }
}

